<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    session_start();
    if(!isset($_SESSION['usuario'])){
            header('location:../html/login.html');
         }
         echo '<center>
                <div id="conte">
                    <table id="cabecera">
                        <tr>
                            <td align="center"> <img id="imagen" src="../imagen/BANNERSIGI.jpg" width="1258" height="125" alt="BANNERSES"/>';
                       echo"</td>
                        </tr>
                        <tr>
                            <td align=right id='sesion'><strong>Sesion:</strong>  ".$_SESSION['nombre']."";
                                echo '<a href="../../controlador/php/sql/cerrarSesion.php"><img src="../imagen/cesesion.png" title="cerrar sesion" width="20" height="20" alt="csesion" align="absbottom"/> </a>
                            </td>
                        </tr>
                        <tr>
                            <td>';
?>
                                <html>
                                    <head>
                                        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                                        <title id="titulo">Reporte</title>
                                        <!-- Librerias jquery y hojas de estilo para creacion  del calendario -->
                                        <script src="js/jquery-1.9.1.min.js"></script>
                                        <script src="js/jquery-1.5.2.js" type="text/javascript"></script>
                                        <link rel="stylesheet" href="css/demos.css" type="text/css">
                                        <link rel="stylesheet" href="css/impresion.css" type="text/css" media="print">
                                        <link rel="stylesheet" href="css/jquery.ui.all.css" type="text/css">
                                        <script type="text/javascript" src="js/jquery.ui.core.js"></script>
                                        <script type="text/javascript" src="js/jquery.ui.widget.js"></script>
                                        <script type="text/javascript" src="js/jquery.ui.datepicker.js"></script>
                                        <link rel="stylesheet" href="css/pestana.css" />
                                        <script src="js/jquery-ui.js"></script>
                                        <title id="titulo">Reporte</title>
                                        
                                        <style>
                                            
                                            .round-a-gray{
                                                background:#444444 url(img/round_gray-left.png) left top no-repeat;
                                                color:#FFFFFF;
                                                text-align:center;
                                                position: absolute;
                                                display: none;
                                                padding: 5px 5px 5px 5px;
                                                border-radius: 5px;
                                                text-align: left;
                                            }
                                            .round-a-gray div{
                                                background:url(img/round_gray-right.png) right bottom no-repeat;
                                                padding:4px;
                                            }
                                            
                                        </style>
                                        
                                        <script>
                                            $(function() {
                                                    $( "#capass2" ).datepicker({ 
                                                     autoSize: true,
                                                     dayNames: ['Domingo', 'Lunes', 'Martes', 'Mi�rcoles', 'Jueves', 'Viernes', 'S�bado'],
                                                     dayNamesMin: ['Dom', 'Lu', 'Ma', 'Mi', 'Je', 'Vi', 'Sa'],
                                                     firstDay: 1,
                                                     monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
                                                     monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
                                                     dateFormat: 'dd-mm-yy',
                                                     changeMonth: true,
                                                     changeYear: true,
                                                     yearRange: "-90:+0"


                                                    });
                                            });

                                            $(function() {
                                                    $( "#capass22" ).datepicker({ 
                                                     autoSize: true,
                                                     dayNames: ['Domingo', 'Lunes', 'Martes', 'Mi�rcoles', 'Jueves', 'Viernes', 'S�bado'],
                                                     dayNamesMin: ['Dom', 'Lu', 'Ma', 'Mi', 'Je', 'Vi', 'Sa'],
                                                     firstDay: 1,
                                                     monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
                                                     monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'],
                                                     dateFormat: 'dd-mm-yy',
                                                     changeMonth: true,
                                                     changeYear: true,
                                                     yearRange: "-90:+0",

                                                    });
                                            });
                                        </script>
                                        <script>
                                            function validar(){
                                                fecha1 = document.getElementById("capass2");
                                                fecha2 = document.getElementById("capass22");

                                                if(fecha1.value ==""){
                                                    alert("campo vacion, por favor seleccione la fecha inicio");
                                                    return false;
                                                }else if(fecha2.value ==""){
                                                    alert("campo vacion, por favor seleccione la fecha fin");
                                                    return false;
                                                }
                                                return true;
                                            }

                                            function limpiar(){
                                                fecha = document.getElementById("capass2");
                                                fecha2 = document.getElementById("capass22");

                                                fecha.value = "";
                                                fecha2.value = "";
                                            }
                                        </script>
                                        <script language="javascript">
                                            $(document).ready(function() {
                                                $(".botonExcel").click(function(event) {
                                                    $("#datos_a_enviar").val( $("<div>").append( $("#Exportar_a_Excel").eq(0).clone()).html());
                                                    $("#FormularioExportacion").submit();
                                                });
                                            });
                                        </script>
                                        <script>
                                            function printDiv()
                                            {
                                                var divToPrint=document.getElementById('Exportar_a_Excel');
                                                newWin= window.open('');
                                                newWin.document.write(divToPrint.outerHTML);
                                                newWin.print();
                                                newWin.close();
                                            }
                                        </script>
                                        <script>
                                            $(function() {
                                                $( "#tabs" ).tabs();
                                            });
                                        </script>
                                        <script type="text/javascript">
                                            function imprSelec()
                                            {
                                                var ficha=document.getElementById('respuesta');var ventimp=window.open(' ','popimpr');ventimp.document.write(ficha.innerHTML);ventimp.document.close();ventimp.print();ventimp.close();
                                            }
                                            
                                            function cargarTiponecesidad(){
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/datosnecesidad.php",
                                                    success: mostrartip
                                                });
                                            }

                                            function mostrartip(datos){
                                                rptn = $.parseJSON(datos);

                                                datos = $("#tipnece");
                                                for(datn in rptn ){
                                                    datos.append("<option value='"+ rptn[datn].tipoid +"'>"+ rptn[datn].tipnombre +"</option>");
                                                }
                                            }
                                            
                                            function consultaDN(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla
                                                });
                                            }
                                            
                                            
                                            function mostrarTabla(datos){
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";
                                                var temp = "";
                                                var nombren = "";
                                                resp += "<table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td colspan='7' align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    CANTIDAD DE SOLICITUDES POR TIPO DE NECESIDAD\
                                                                </td>\
                                                            </tr>\ ";
                                                for(r in rpt){
                                                 
                                                   nombren = rpt[r].tipnombre;
                                                   if(temp != nombren){
                                                       resp += "<tr>\
                                                                    <td colspan='7' align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                        "+ nombren +"\
                                                                    </td>\
                                                                </tr>\
                                                                <tr>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Registrados\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Asignados\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    En Tramite\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Con Respuesta\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Verificados\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Aceptados\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Derrogados\
                                                                </td>\
                                                            </tr>";
                                                   }
                                                   temp = nombren;
                                                
                                                   resp += "\
                                                            <tr>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].reg +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].asi +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].tra +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].res +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].ver +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].ace +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].der +"\
                                                                </td>\
                                                            </tr>\
                                                                  ";
                                                }
                                                resp += "</table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                            }
                                            
                                            function consultaDN2(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla2
                                                });
                                            }
                                            
                                            
                                            function mostrarTabla2(datos){
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";
                                                resp += "<table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:40%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td colspan='7' align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    CANTIDAD DE SOLICITUDES POR MECANISMO DE DETECCION\
                                                                </td>\
                                                            </tr>\
                                                            <tr>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Mecanismo de Deteccion\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Cantidad Solicitudes\
                                                                </td>\
                                                            </tr>\ ";
                                                for(r in rpt){
                                                   resp += "\
                                                            <tr>\
                                                                <td style='padding:10px 10px 10px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].mecnombre +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].cantidad +"\
                                                                </td>\
                                                            </tr>";
                                                }
                                                resp += "</table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                            }
                                            
                                            function consultaDN3(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla3
                                                });
                                            }
                                            
                                            
                                            function mostrarTabla3(datos){
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";
                                                var temp = "";
                                                var nombren = "";
                                                resp += "<table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:40%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td colspan='7' align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    CANTIDAD DE SOLICITUDES ASIGNADAS A FUNCIONARIO O LIDER DE DETECCION\
                                                                </td>\
                                                            </tr>\
                                                            <tr>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Funcionarios\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Cantidad Solicitudes\
                                                                </td>\
                                                            </tr>\ ";
                                                for(r in rpt){
                                                   resp += "\
                                                            <tr>\
                                                                <td style='padding:10px 10px 10px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].NOMBRES +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].num +"\
                                                                </td>\
                                                            </tr>\
                                                            ";
                                                }
                                                resp += "</table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                            }
                                            
                                            
                                            function consultaDN4(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla4
                                                });
                                            }
                                            
                                            
                                            function mostrarTabla4(datos){
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";

                                                var temp = "";
                                                var nombren = "";
                                                resp += "<table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:40%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>";
                                                var con = "";
                                                var val1 = 0;
                                                var val2 = 0;
                                                var val3 = 0;
                                                var val4 = 0;
                                                var val5 = 0;
                                                //suma de columnas
                                                var sumav1 = 0;
                                                var sumav2 = 0;
                                                var sumav3 = 0;
                                                var sumav4 = 0;
                                                var sumav5 = 0;
                                                var suma = 0;
                                                //indices
                                                var indi1 = 0;
                                                var indi2 = 0;
                                                var indi3 = 0;
                                                var indi4 = 0;
                                                var indi5 = 0;
                                                resp += "<table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td colspan='7' align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    INDICADOR DE SATISFACCION DEL CLIENTE INTERNO\
                                                                </td>\
                                                            </tr>\n\
                                                            <tr>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Pregunta\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Muy malo\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Malo\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Regular\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Bueno\
                                                                </td>\
                                                                <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Excelente\
                                                                </td>\
                                                            </tr>";
                                                for(r in rpt){

                                                   val1 = parseInt(rpt[r].cant1);
                                                   val2 = parseInt(rpt[r].cant2);
                                                   val3 = parseInt(rpt[r].cant3);
                                                   val4 = parseInt(rpt[r].cant4);
                                                   val5 = parseInt(rpt[r].cant5);

                                                   resp += "\
                                                            <tr>\
                                                                <td style='padding:10px 10px 10px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ rpt[r].encdescrip +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ val1 +"\
                                                                </td>\
                                                                 <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ val2 +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ val3 +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ val4 +"\
                                                                </td>\
                                                                <td align='center' style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                    "+ val5 +"\
                                                                </td>\
                                                            </tr>";
                                                                    
                                                   sumav1 = sumav1 + val1;
                                                   sumav2 = sumav2 + val2;
                                                   sumav3 = sumav3 + val3;
                                                   sumav4 = sumav4 + val4;
                                                   sumav5 = sumav5 + val5;
                                                   con++;                 
                                                }
                                                
                                                suma = parseInt(sumav1 + sumav2 + sumav3 + sumav4 +sumav5);
                                                indi1 = (sumav1 * 100 / suma).toFixed(1);
                                                indi2 = (sumav2 * 100 / suma).toFixed(1);
                                                indi3 = (sumav3 * 100 / suma).toFixed(1);
                                                indi4 = (sumav4 * 100 / suma).toFixed(1);
                                                indi5 = (sumav5 * 100 / suma).toFixed(1);
                                                
                                                
                                                resp += "<tr>\
                                                            <td style='padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                <table style='width:100%'><tr><td align=center>INDICE DE SATISFACCION<td/><td align=right>TOTAL: <strong>"+ suma +"</strong></td></tr></table>\
                                                            </td>\
                                                            <td style='padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                <strong>"+ sumav1 +"</strong> /"+ indi1 +"%\
                                                            </td>\
                                                            <td style='padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                <strong>"+ sumav2 +"</strong> /"+ indi2 +"%\
                                                            </td>\
                                                            <td style='padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                <strong>"+ sumav3 +"</strong> /"+ indi3 +"%\
                                                            </td>\
                                                            <td style='padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                <strong>"+ sumav4 +"</strong> /"+ indi4 +"%\
                                                            </td>\
                                                            <td style='padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                <strong>"+ sumav5 +"</strong> /"+ indi5 +"%\
                                                            </td>\
                                                         </tr>";

                                                resp += "</table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                            }
                                            
                                            function consultaDN5(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla5
                                                });
                                                
                                            }
                                            
                                            function mostrarTabla5(datos){
                                                
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";
                                                var con = 1;
                                                var suma = 0;
                                                
                                                resp += '<div style="overflow-y: scroll;height: 500px;margin-bottom:10px">\
                                                         <table id="Exportar_a_Excel" align="center" style="font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);">\
                                                            <tr>\
                                                                <td colspan="3" align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CANTIDAD DE SOLICOTUDES POR USUARIO\
                                                                </td>\
                                                            </tr>\
                                                            <tr>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    \
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CLIENTE INTERNO\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CANTIDAD\
                                                                </td>\
                                                            </tr>';
                                                for(r in rpt){
                                                    
                                                    resp += '<tr>\
                                                                <td style="padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ con +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].USUARIOS +'\
                                                                </td>\
                                                                <td style="padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    <label id="num'+ r +'" style="cursor:pointer;font-size:100%" onclick="enviarPosicion('+ r +','+ rpt[r].CANT +')">'+ rpt[r].CANT +'</label><input type="hidden" id="lstoid'+ r +'" name="txtlstoid" value="'+ rpt[r].OIDS +'" />\
                                                                </td>\
                                                            </tr>';
                                                            suma = parseInt(rpt[r].CANT)+parseInt(suma);
                                                    con++;
                                                }
                                                
                                               resp += "</table>\
                                                        </div>\
                                                        <table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td align='right' style='padding:10px 10px 10px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    TOTAL: "+ suma +"\
                                                                </td>\
                                                            </tr>\
                                                        </table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                                
                                            }
                                            
                                            function consultaDN6(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla6
                                                });
                                                
                                            }
                                            
                                            function mostrarTabla6(datos){
                                                
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";
                                                var con = 1;
                                                var suma = 0;
                                                
                                                resp += '<div style="overflow-y: scroll;height: 500px;margin-bottom:10px">\
                                                         <table id="Exportar_a_Excel" align="center" style="font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);">\
                                                            <tr>\
                                                                <td colspan="3" align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CANTIDAD DE SOLICITUDES POR NECESIDAD\
                                                                </td>\
                                                            </tr>\
                                                            <tr>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    \
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    NECESIDAD\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CANTIDAD\
                                                                </td>\
                                                            </tr>';
                                                for(r in rpt){
                                                    
                                                    resp += '<tr>\
                                                                <td style="padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ con +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].necnombre +'\
                                                                </td>\
                                                                <td title="Cantidad" style="padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].CANT +'\
                                                                </td>\
                                                            </tr>';
                                                            suma = parseInt(rpt[r].CANT)+parseInt(suma);
                                                    con++;
                                                }
                                                
                                               resp += "</table>\
                                                        </div>\
                                                        <table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td align='right' style='padding:10px 10px 10px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    TOTAL: "+ suma +"\
                                                                </td>\
                                                            </tr>\
                                                        </table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                                
                                            }
                                            
                                            function consultaDN7(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla7
                                                });
                                                
                                            }
                                            
                                            function mostrarTabla7(datos){
                                                
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";
                                                var con = 1;
                                                var suma = 0;
                                                
                                                resp += '<div style="overflow-y: scroll;height: 500px;margin-bottom:10px">\
                                                         <table id="Exportar_a_Excel" align="center" style="font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);">\
                                                            <tr>\
                                                                <td colspan="3" align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CANTIDAD DE SOLICOTUDES CALIFICADAS COMO "MUY MALO"\
                                                                </td>\
                                                            </tr>\
                                                            <tr>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    \
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    NECESIDAD\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CANTIDAD\
                                                                </td>\
                                                            </tr>';
                                                for(r in rpt){
                                                    
                                                    resp += '<tr>\
                                                                <td style="padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ con +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].necnombre +'\
                                                                </td>\
                                                                <td title="Cantidad" style="padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].CANT +'\
                                                                </td>\
                                                            </tr>';
                                                            suma = parseInt(rpt[r].CANT)+parseInt(suma);
                                                    con++;
                                                }
                                                
                                               resp += "</table>\
                                                        </div>\
                                                        <table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td align='right' style='padding:10px 10px 10px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    TOTAL: "+ suma +"\
                                                                </td>\
                                                            </tr>\
                                                        </table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                                
                                            }
                                            
                                            function consultaDN8(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla8
                                                });
                                            }
                                            
                                            function mostrarTabla8(datos){
                                                
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";
                                                var con = 1;
                                                var suma = 0;
                                                
                                                resp += '<div style="overflow-y: scroll;height: 500px;margin-bottom:10px">\
                                                         <table id="Exportar_a_Excel" align="center" style="font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);">\
                                                            <tr>\
                                                                <td colspan="3" align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CANTIDAD DE SOLICOTUDES POR SERVICIO\
                                                                </td>\
                                                            </tr>\
                                                            <tr>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    \
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    SERVICIO\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CANTIDAD\
                                                                </td>\
                                                            </tr>';
                                                for(r in rpt){
                                                    
                                                    resp += '<tr>\
                                                                <td style="padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ con +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].GDPNOMBRE +'\
                                                                </td>\
                                                                <td title="Cantidad" style="padding:10px 10px 10px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].CANT +'\
                                                                </td>\
                                                            </tr>';
                                                            suma = parseInt(rpt[r].CANT)+parseInt(suma);
                                                    con++;
                                                }
                                                
                                               resp += "</table>\
                                                        </div>\
                                                        <table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:70%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td align='right' style='padding:10px 10px 10px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    TOTAL: "+ suma +"\
                                                                </td>\
                                                            </tr>\
                                                        </table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                                
                                            }
                                            
                                            function consultaDN9(){
                                                
                                                var tipc = $("#tipc").val();
                                                var tipn = $("#tipnece").val();
                                                var fechaa = $("#capass2").val();
                                                var fechab = $("#capass22").val();
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,tipn:tipn,fechaa:fechaa,fechab:fechab},
                                                    success: mostrarTabla9
                                                });
                                                
                                            }
                                            
                                            function mostrarTabla9(datos){
                                                
                                                rpt = $.parseJSON(datos);
                                                datos = $("#respuesta");
                                                var resp = "";
                                                var con = 0;
                                                var suma = 0;
                                                var dias = 0;
                                                var horas = 0;
                                                var promedio = 0;
                                                
                                                resp += '<div style="overflow-y: scroll;height: 500px;margin-bottom:10px">\
                                                         <table id="Exportar_a_Excel" align="center" style="font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);">\
                                                            <tr>\
                                                                <td colspan="8" align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    INDICADOR DE OPORTUNIDAD CLIENTE INTERNO\
                                                                </td>\
                                                            </tr>\
                                                            <tr>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    \
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    IDENTIFICACION\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    USUARIO\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    CARGO\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    FECHA DE REGISTRO\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    FECHA DE RESPUESTA\
                                                                </td>\
                                                                <td align="center" style="padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;">\
                                                                    OPORTUNIDAD / DIAS\
                                                                </td>\
                                                            </tr>';
                                                for(r in rpt){
                                                    
                                                    /*de horas a dia(s)*/
                                                    horas = rpt[r].HORAS;
                                                    dias = ((horas*1)/24).toFixed(2);
                                                    suma = parseFloat(suma) + parseFloat(dias);
                                                    con++;
                                                    resp += '<tr>\
                                                                <td style="padding:5px 5px 5px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ con +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].usu_documento +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].USUARIO +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].CARGO +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].h1 +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    '+ rpt[r].h2 +'\
                                                                </td>\
                                                                <td style="padding:5px 5px 5px;text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));">\
                                                                    <strong>'+ dias +'</strong>\
                                                                </td>\
                                                            </tr>';
                                                }
                                                
                                               promedio = (suma/con).toFixed(2);
                                               resp += "</table>\
                                                        </div>\
                                                        <table id='Exportar_a_Excel' align='center' style='font-size:80%;overflow:hidden;border:1px solid #d3d3d3;background:#fefefe;width:100%;-moz-border-radius:5px; /* FF1+ */-webkit-border-radius:5px; /* Saf3-4 */border-radius:5px;-moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);-webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);'>\
                                                            <tr>\
                                                                <td align='right' style='padding:10px 10px 10px; text-align:right;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    CANTIDAD DE SOLICITUDES: <strong>"+ con +"</strong> / PROPMEDIO: <strong>"+ promedio +"</strong>\
                                                                </td>\
                                                            </tr>\
                                                        </table>";
                                                $("#respuesta").text("");
                                                datos.append(resp);
                                                
                                            }
                                            
                                            function validar(){
                                                if($("#tipc").val() == 1 ){
                                                    consultaDN();
                                                }else if($("#tipc").val() == 2 ){
                                                    consultaDN2();
                                                }else if($("#tipc").val() == 3 ){
                                                    consultaDN3();
                                                }else if ($("#tipc").val() == 4){
                                                   consultaDN4(); 
                                                }else if($("#tipc").val() == 5){
                                                   consultaDN5(); 
                                                }else if($("#tipc").val() == 6){
                                                   consultaDN6(); 
                                                }else if($("#tipc").val() == 7){
                                                   consultaDN7(); 
                                                }else if($("#tipc").val() == 8){
                                                   consultaDN8(); 
                                                }else if($("#tipc").val() == 9){
                                                   consultaDN9(); 
                                                }
                                            }
                                            
                                            function enviarPosicion(p,c){
                                                
                                                var tipc = 10;
                                                
                                                var lstoid = document.getElementById("lstoid"+p).value;
                                                
                                                
                                                $.ajax({
                                                    type: "POST",
                                                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                                                    url: "../../DeteccionN/controlador/sql/reporteDN.php",
                                                    data: {tipc:tipc,lst:lstoid},
                                                    success: function respu(datos){
                                                                rpt = $.parseJSON(datos);
                                                                $("#mensaje").text("");
                                                                
                                                                $("#mensaje").append("<label style='cursor:pointer' align='center' onclick='limpiarM();'>X</label>");
                                                                
                                                                for(r in rpt){
                                                                    
                                                                    $("#mensaje").append("- "+rpt[r].necnombre+"</br>");
                                                                    
                                                                }
                                                                
                                                    }
                                                });
                                                
                                                var posi = $("#num"+p).offset();
                                                //alert("Izquierda "+posi.left+ " -Arriba " +posi.top);
                                                document.getElementById("mensaje").style.display = "block";
                                                document.getElementById("mensaje").style.left = posi.left + 210;
                                                document.getElementById("mensaje").style.top = posi.top - 10;
                                                //setTimeout('document.getElementById("mensaje").style.display = "none"',5000);
                                                
                                            }
                                            
                                            function limpiarM(){
                                                
                                                $("#mensaje").text("");
                                                document.getElementById("mensaje").style.display = "none";
                                                
                                            }
                                            
                                        </script>
                                        
                                    </head>     
                                    <body onload="cargarTiponecesidad();">
                                        <div id="tabs"> 
                                            <ul>
                                                <li><a href="#tabs-1">Reportes</a></li>
                                            </ul>
                                            <div id="tabs-1">
                                                    <form id="reportes" method="post" action="javascript:validar()">
                                                        <table id="tabl">
                                                            <tr>
                                                                <td align="center" colspan="2">
                                                                    <strong>Reporte Detección de Necesidades</strong>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center">
                                                                    Tipo de Consulta
                                                                </td>
                                                                <td>
                                                                    <select id="tipc" name="cbticon" style="width: 130px;height:25px;">
                                                                        <option>Seleccione</option>
                                                                        <option title="cantidad de solicitudes por tipo de necesidad en todos los estados" value="1">Cantidad de Solicitudes</option>
                                                                        <option title="cantidad de solicitudes por mecanismo de deteccion" value="2">Cantidad de Solicitudes por Mecanismos de Detección</option>
                                                                        <option title="cantidad de solicitudes por funcionario" value="3">Cantidad de Solicitudes por Funcionario</option>
                                                                        <option title="cantidad de solicitudes por area de servicio" value="8">Cantidad de Solicitudes por Area de Servicio</option>
                                                                        <option title="cantidad de solicitudes por usuario" value="5">Cantidad de Solicitudes por Usuario</option>
                                                                        <option title="cantidad de solicitudes por necesidad" value="6">Cantidad de Solicitudes por Necesidad</option>
                                                                        <option title="cantidad de solicitudes calificadas como 'Muy Malo'" value="7">Cantidad de Solicitudes Calificadas como 'Muy Malo'</option>
                                                                        <option title="indicador de satisfaccion del cliente interno" value="4">Indicador de Satisfaccion del Cliente Interno</option>
                                                                        <option title="indicador oportunidad del cliente interno" value="9">Indicador de Oportunidad del Cliente Interno</option>
                                                                    </select>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center">
                                                                    Tipo de Necesidad
                                                                </td>
                                                                <td>
                                                                    <select id="tipnece" name="cbtipn" style="width: 130px;height:25px;">
                                                                        <option>Seleccione</option>
                                                                    </select>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" >
                                                                    Fecha inicial:
                                                                </td>
                                                                <td>
                                                                    <input  name="capa1" type="text" class="reporte_termino" id="capass2" size="12" style="width: 130px;height:25px;"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right">
                                                                    Fecha final:
                                                                </td>
                                                                <td>
                                                                    <input  name="capa2" type="text" class="reporte_termino" id="capass22" size="12" style="width: 130px;height:25px;"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="center" colspan="2">
                                                                    <input id="genREporte" type="submit" value="Generar" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        <table  align="right">
                                                            <tr>
                                                                <td>
                                                                    <img style="cursor: pointer;" title="atras" src="../imagen/atras.png" width="30" height="30" alt="atras" onclick="window.history.back();"/>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                        </br></br></br>
                                                        </form>
                                                        <hr id="sepa">
                                                        <table id="opci">
                                                            <tr>
                                                                <td>
                                                                    <form action="../../controlador/php/sql/excel.php" method="post" target="_blank" id="FormularioExportacion">
                                                                        <img title="generar en excel" src="../imagen/excel.png" width="30" height="30" class="botonExcel" />
                                                                        <input type="hidden" id="datos_a_enviar" name="datos_a_enviar" />
                                                                    </form>
                                                                </td>
                                                                <td  align="absbottom" >
                                                                    <a href="javascript:imprSelec()">
                                                                        <img title="imprimir" border="0" src="../imagen/imprimir.png" width="30" height="30">
                                                                    </a>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                <div id="respuesta">
                                                    
                                                </div>
                                            </div>
                                        </div>
                                        <div class="round-a-gray" id="mensaje" align="left">
                                            
                                        </div>
                                    </body>
                                </html>
                           </td>
                       </tr>
               </table>
               </div>
              </center>

